Skip to content

find the corresponding english page to list languages #2666

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 4, 2023

Conversation

bishabosha
Copy link
Member

@bishabosha bishabosha commented Jan 3, 2023

This solves an issue that if the first alphabetically ordered page in a multipage-overview is not translated, then that language will not appear in the language dropdown.

Instead, we now find the english page that has the same id (read as language-independent URL) to source the translations for that individual page, rather than for the whole overview

This problem manifested in the ru translation of the scala 3 book, which does not have a translation for _overviews/scala3-book/ca-context-bounds.md, i.e. the first alphabetically ordered English page in the collection. See the change here:

before:
Screenshot 2023-01-03 at 16 20 13

after:
Screenshot 2023-01-03 at 16 20 28

@bishabosha bishabosha force-pushed the lang-dropdown-ru-scala-book branch from 524cec7 to 3aec13d Compare January 3, 2023 15:32
Copy link
Contributor

@julienrf julienrf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you Jamie!

@bishabosha bishabosha merged commit ed49c80 into scala:main Jan 4, 2023
@bishabosha bishabosha deleted the lang-dropdown-ru-scala-book branch December 20, 2023 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants